package com.sunchis.demo.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.ibatis.type.Alias;

import com.sunchis.demo.model.dept.Department;

@Entity
@Table(name = "t_user")
@Alias("User")
@SuppressWarnings("serial")
public class User implements Serializable {
	private int uid;
	private String name;
	private String sex;
	private String position;
	private int deptId;
	private Department department;
	
	public User(){
	}
	
	public User(int uid){
		this.uid = uid;
	}

	@Id
	@Column(length = 16)
	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public int getDeptId() {
		return deptId;
	}

	public void setDeptId(int deptId) {
		this.deptId = deptId;
	}

	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}
}
